package org.dey.controller;

import org.apache.ibatis.annotations.Param;
import org.dey.pojo.CheckItem;
import org.dey.service.CheckItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author deyran
 * @date 2022/3/22 19:31
 * @classname
 * @see
 */
@RestController
public class CheckItemController {

    @Autowired
    private CheckItemService checkItemService;

    /*@GetMapping("/checkItem")
    public List<CheckItem> selectAll(@Param("pageNum") int pageNum, @Param("pageSize") int pageSize){
        return checkItemService.CheckItems(pageNum,pageSize);
    }*/

    @GetMapping("/checkItem")
    public List<CheckItem> selectAll(
            @RequestParam(value = "pageNum", required = false, defaultValue = "1") int pageNum,
            @RequestParam(value = "pageSize", required = false, defaultValue = "5") int pageSize){
        return checkItemService.CheckItems(pageNum,pageSize);
    }

}
